About 508 letters

About 3 minutes

#bin

Description: Converts an integer to a binary string prefixed with 0b.

def bin(x: int): ''' Converts an integer to a binary string prefixed with `0b` :param x: An integer :return: The binary string representation of x '''

Example:

print(bin(0)) print(bin(10)) print(bin(1024))

>>> Establishing WebAssembly Runtime.

>>> Standby.

Powered by Shift.

Created in 6/9/2025

Updated in 6/9/2025